3.5 \(\int \frac {1}{a+b \csc ^2(c+d x)} \, dx\)

Optimal. Leaf size=46 \[ \frac {x}{a}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right )}{a d \sqrt {a+b}} \]

[Out]

x/a-arctan((a+b)^(1/2)*tan(d*x+c)/b^(1/2))*b^(1/2)/a/d/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4127, 3181, 205} \[ \frac {x}{a}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right )}{a d \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Csc[c + d*x]^2)^(-1),x]

[Out]

x/a - (Sqrt[b]*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[b]])/(a*Sqrt[a + b]*d)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3181

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[1/(a + (a + b)*ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]

Rule 4127

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> Simp[x/a, x] - Dist[b/a, Int[1/(b + a*Cos[e +
f*x]^2), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a + b, 0]

Rubi steps

\begin {align*} \int \frac {1}{a+b \csc ^2(c+d x)} \, dx &=\frac {x}{a}-\frac {b \int \frac {1}{b+a \sin ^2(c+d x)} \, dx}{a}\\ &=\frac {x}{a}-\frac {b \operatorname {Subst}\left (\int \frac {1}{b+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac {x}{a}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right )}{a \sqrt {a+b} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 46, normalized size = 1.00 \[ \frac {-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right )}{\sqrt {a+b}}+c+d x}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Csc[c + d*x]^2)^(-1),x]

[Out]

(c + d*x - (Sqrt[b]*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[b]])/Sqrt[a + b])/(a*d)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 260, normalized size = 5.65 \[ \left [\frac {4 \, d x + \sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 5 \, a b + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{a^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + a b\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{4 \, a d}, \frac {2 \, d x + \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{2 \, a d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/4*(4*d*x + sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(d*x + c)^4 - 2*(a^2 + 5*a*b + 4*b^2)*cos(d*x + c
)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-b/(a + b))*sin(d*x + c
) + a^2 + 2*a*b + b^2)/(a^2*cos(d*x + c)^4 - 2*(a^2 + a*b)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)))/(a*d), 1/2*(2
*d*x + sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(d*x + c)^2 - a - b)*sqrt(b/(a + b))/(b*cos(d*x + c)*sin(d*x +
 c))))/(a*d)]

________________________________________________________________________________________

giac [B]  time = 0.59, size = 81, normalized size = 1.76 \[ -\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a b + b^{2}}}\right )\right )} b}{\sqrt {a b + b^{2}} a} - \frac {d x + c}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2),x, algorithm="giac")

[Out]

-((pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a*b + b^2)))*b/
(sqrt(a*b + b^2)*a) - (d*x + c)/a)/d

________________________________________________________________________________________

maple [A]  time = 0.61, size = 50, normalized size = 1.09 \[ -\frac {b \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{d a \sqrt {\left (a +b \right ) b}}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*csc(d*x+c)^2),x)

[Out]

-1/d/a*b/((a+b)*b)^(1/2)*arctan((a+b)*tan(d*x+c)/((a+b)*b)^(1/2))+1/d/a*arctan(tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 46, normalized size = 1.00 \[ -\frac {\frac {b \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} a} - \frac {d x + c}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2),x, algorithm="maxima")

[Out]

-(b*arctan((a + b)*tan(d*x + c)/sqrt((a + b)*b))/(sqrt((a + b)*b)*a) - (d*x + c)/a)/d

________________________________________________________________________________________

mupad [B]  time = 0.25, size = 104, normalized size = 2.26 \[ \frac {\mathrm {atan}\left (\frac {2\,a\,b^2\,\mathrm {tan}\left (c+d\,x\right )}{2\,a^2\,b+2\,a\,b^2}+\frac {2\,a^2\,b\,\mathrm {tan}\left (c+d\,x\right )}{2\,a^2\,b+2\,a\,b^2}\right )}{a\,d}+\frac {\mathrm {atanh}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\sqrt {-b\,\left (a+b\right )}}{b}\right )\,\sqrt {-b\,\left (a+b\right )}}{d\,\left (a^2+b\,a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b/sin(c + d*x)^2),x)

[Out]

atan((2*a*b^2*tan(c + d*x))/(2*a*b^2 + 2*a^2*b) + (2*a^2*b*tan(c + d*x))/(2*a*b^2 + 2*a^2*b))/(a*d) + (atanh((
tan(c + d*x)*(-b*(a + b))^(1/2))/b)*(-b*(a + b))^(1/2))/(d*(a*b + a^2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{a + b \csc ^{2}{\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)**2),x)

[Out]

Integral(1/(a + b*csc(c + d*x)**2), x)

________________________________________________________________________________________